import request from '@/utils/request'

// 查询生产记录列表
export function listRecord(query) {
  return request({
    url: '/produce/recordManage/list',
    method: 'get',
    params: query
  })
}

// 查询生产记录详细
export function getRecord(id) {
  return request({
    url: '/produce/recordManage/' + id,
    method: 'get'
  })
}

// 新增生产记录
export function addRecord(data) {
  return request({
    url: '/produce/recordManage',
    method: 'post',
    data: data
  })
}

// 修改生产记录
export function updateRecord(data) {
  return request({
    url: '/produce/recordManage',
    method: 'put',
    data: data
  })
}

// 删除生产记录
export function delRecord(id) {
  return request({
    url: '/produce/recordManage/' + id,
    method: 'delete'
  })
}


// 班组列表
export function getTeamGroupSelect() {
  return request({
    url: '/basic/groupManagement/listSelect',
    method: 'get'
  })
}

// 生产线下拉列表
export function getProductlineList() {
  return request({
    url: '/basic/productLine/selectList',
    method: 'get'
  })
}


// 工厂下拉列表
export function getFactoryList() {
  return request({
    url: '/basic/factory/selectList',
    method: 'get'
  })
}


// 删除生产记录
export function linkPlan(id) {
  return request({
    url: '/produce/recordManage/link/plan/' + id,
    method: 'delete'
  })
}
